button: Add explicit key bindings for activation
authorMatthias Clasen <mclasen@redhat.com>
Sat, 18 Jul 2020 16:51:18 +0000 (12:51 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 18 Jul 2020 16:53:10 +0000 (12:53 -0400)
commit7b76be53606fe909160d853e49bb1c41bfa93e71
tree2c3c8fe7ce67273293c8cb945368c574d7bdbb1a
parent2e2336ffce5e0a3eae0059babfc36a9668166fe3
button: Add explicit key bindings for activation

We should not rely on GtkWindow to have global
"activate-default" key bindings that happen to
fall back to activating the focus widget. This is
unreliable, since the bubbling up from the button
to the toplevel may run across other widgets that
may want to use Enter for their own purpose, and
then the button loses out. By adding our own
key bindings, the button gets to handle it before
its ancestors.

This fixes check buttons in the inspector property
list not reacting to Enter despite having focus.
gtk/gtkbutton.c